To keep desk accessories open in Hypercard, use the Windows DA (from BatteryPak), to bring HyperCard's window back to the front. David Dunham uses his Acta DA to transfer pictures and text from other applications into HyperCard. (Thanks, David Dunham and The Mouse Times, Goleta, CA)
Here's a biggie! Everyone has been hollering for a way to toggle between Button tool, Field tool and Browse tool rapidly.
First, the manual tells us we can use Command/Tab to get the browse tool. Aha, but here is a better one. You can toggle between all three tools if you put this into the script of the HyperCard Home stack:
on enterKey
if the tool is "browse tool"
then choose button tool
else if the tool is "button tool"
then choose field tool
else choose browse tool
end enterKey
Now the enter key will toggle browse, button, field as fast as you can click the key.
Of course, if you use enter for repeated searches, you might want to modify the script to include the shift key by adding a line:
if the shiftKey is down
(David Dunham and Michael Long in The Mouse Times)
HyperCard waits for user response when it encounters a dialog box. You will have to keep this in mind when programming.
Buttons which highlight when the cursor runs across them help novices (and experts, too). Add the following code to the button script:
on mouseEnter
set hilite of the target to true
end mouseEnter
on mouseLeave
set hilite of the target to false
end mouseEnter
This works, but you have to write the script into every single button, one at a time. If you try to write this script into the stack, it acts on fields, too -- which is not what you want. So try this for all buttons in a stack to highlight:
on mouseEnter
if "button" is in the target then set hilite of the target to true
end mouseEnter
on mouseLeave
if "button" is in the target then set hilite of the target to false
end mouseLeave
(Thanks to David Moen and Richard Crispin in The Mouse Times)
To prohibit people from peeking at your buttons (sounds a bit salacious, huh?), take your user to a special "no peek" card and back again. The no peek card can tell the user that the use of Command/Option is prohibited and return the user to the original card. Here is some script for this move:
On Idle
if the commandkey is down and
the optionkey is down then
push this card
go card "no peeking"
end if
end Idle
And for the "no peeking" card's script:
On Idle
if the commandkey is up and
the optionkey is up then
pop card
end if
End Idle
Here's a handy idea. Create a button on your Home card with a script that says
go to stack "the stack you want"
When you click on it, not finding a stack by that name will give you a standard dialog box to go get any stack you want. This is handy when you can't remember the EXACT title you gave a stack.
Remember that HyperCard stacks are volatile! Make a COPY of any stack you are going to play with. You may inadvertently change something, and it's nice to have a clean, untouched copy. (Peter Olson in The Mouse Times)
Holding down the Shift key while clicking on a button with button tool takes you directly into the script.
Never name a button or field starting with a number. HyperCard will look for a button or card with that number, not for the name incorporating the number.
To speed up "Show all cards" in a stack, write in script for the stack that "on OpenStack" will lock the screen, show all cards and unlock the screen. This will invisibly show all cards, caching them so that when you use show all cards, it will really whiz bang through them.
Mac II owners have to use the monitor in bit 2 mode to see any of the visual effects (barndoor, dissolve, scroll, etc.)
Use doMenu to get to any desk accessory or any menu item. Be sure you spell it right in the script. Example: doMenu Choose will not work, but doMenu Chooser will. Punctuation, spaces and spelling are important.
You can have a different cursor. Just use the script "Set cursor to x" where "x" is a number of a cursor. 1 is an I-beam, 2 is a crossbar, 3 is a thick crossbar, 4 is the watch and 5 is the arrow or browse tool.
Command/Spacebar will bring up (or hide) the Menu bar.
To make your Phone Stack dial the * and the #, click on the script, find two instances of the string 0123456789. Change each one to read 0123456789#* and it will now work. (David Fry in The Mouse Times)
Option/O shows you what is opaque white and what is not if you are in Paint Tools.
To get a miniature picture of a card, use Copy Card from the Edit menu, go to the card you want the miniature on, hold down Command/Shift and type a V. You will get a mini-image of the card.
Idea: you could have a page full of these with a transparent button over each one to take you to that stack (or card) instantly.
Pressing Command/period will stop any script in its tracks.
Just like MacWrite, double clicking a word selects the entire word.
Drag on text in a field and HyperCard places it in the message box, where you can execute it, if it is "executable."
Mouseup, down, within, etc. messages in fields only work when the field text is locked.
The characters ≤ and ≥ for greater than or equal and less than or equal work in HyperCard. Get them with Option/< and Option/>.
Go screenless with the script:
set visible of cardwindow to false
If a stack has been user-limited, but has no password protection, you can override the limits. Hold down the Command key while you lower the File menu. Guess what? There is the Protect Stack menu item. You can use it to change your user level.
If a stack shows only the Browse level, you should first go to the User Preference Card (one before the Home Card) and make sure your desired level is selected. If the author intended you to have that level, it will now be available.
If a stack beeps and returns you to the Browse level, do this: Run through a few cards, then use Recent (Command/R) and select one. Select Stack Info... and look at the script. Remove the instruction which keeps going to the User Preference Card to reduce your user level.
If a stack always hides the menu bar, open the stack's script and look for a "hide menubar" entry. Remove it. If you don't find it in the stack script, try the card script(s) until you find it. It's in there somewhere.
Of course you could use Command/spacebar to toggle the menu bar on and off each time you need it or want to hide it.
Here's a neat script to move selected objects from a card to the Background quickly:
on functionkey whatkey
if whatkey is 6 then
type "x" with commandkey -- cut whatever is selected
doMenu "background" -- enter the background
type "v" with commandkey -- paste it
doMenu "background" -- leave the background
else
pass functionkey
end if
end function keys
Here is another way:
on mouseUp
choose select tool
click at 120,100 -- selects upper left corner of image
drag from 120,100 to 350,200 -- draws marquee to select an object